package com.itheima.main;

public class B5 {
    public static void main(String[] args) {
        int[] arr = {11,22,33,55,44};
        int[] mam = getmam(arr);
        System.out.println(mam[0]);
        System.out.println(mam[1]);
    }
    public static  int[] getmam(int[] arr){
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(max<arr[i]){
                max = arr[i];
            }
        }
        int min = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(min>arr[i]){
                min = arr[i];
            }
        }
        int[] mam = {min ,max};
        return mam;
    }
}
